<!DOCTYPE html>
<html lang="en">

<head>
    <script type="text/javascript" src="js/uaparser.js"></script>
</head>

<body>
    <dialog>
        <div style="background-color: red;" draggable="true">title</div>
        <div>content</div>
        <button>Open another</button>
    </dialog>
    <button id='btn'>Open</button>
    <dialog id='dialog' role="dialog">hello world</dialog>
</body>
<script>
    let dialog = document.querySelector('dialog');
    let button = document.getElementById('btn');
    button.addEventListener('click', e => dialog.showModal());
    dialog.querySelector('button').addEventListener('click', e => document.getElementById('dialog').showModal());
</script>

</html>